package com.example.kotlin.basis

/**
 * Created by xiao_tan on 17/7/9.
 */

fun main(args: Array<String>){
    var quantity = 5//声明变量
    var price: Double = 20.3
    var name: String = "zgl"
    val CONST: Int = 3//声明常量

    println("单价:${price}元")
    println("数量:$quantity")
    println("姓名:$name")
    println("常量:$CONST")

    for (x in 1..5){
        println(x)
    }

    var x = 3;
    var y = 4;
    for (x in 1..y-1){
        println("OK")
    }

    var names = mutableListOf<String>("a","b","c");
    for (name in names){
        println(name)
    }

}